package cn.edu.scau.cmi.chenjia.adapter;

import java.util.ArrayList;
import java.util.List;

public class SortUtil {
		public ArrayList<Student> sort(ArrayList<Student> studentList){
			for(int i=0;i<studentList.size()-1;i++) {
				for(int j=0;j<studentList.size()-i-1;j++) {
					if(studentList.get(j).number>studentList.get(j+1).number) {
						Student st=studentList.get(j);
						studentList.set(j, studentList.get(j+1));
						studentList.set(j+1, st);
					}
				}
			}
			return studentList;
		}
}
